/**
 * @file config.h
 *
 * The configuration file for Basic Computation Supporting Library
 *
 * @author dhlin
 */

#ifdef _MSC_VER
#pragma once
#endif

#ifndef SLIPP_CONFIG_H
#define SLIPP_CONFIG_H

// Platform-specific stuff

#define SLIPP_MSVC 0x01
#define SLIPP_GCC 0x02
#define SLIPP_CLANG 0x03

#define SLIPP_WINDOWS_INTERFACE 0x11
#define SLIPP_POSIX_INTERFACE 0x12

#if (defined(_WIN32) || defined(_WIN64)) && defined(_MSC_VER)
	#if _MSC_VER < 1600
		#error Microsoft Visual C++ of version lower than MSVC 2010 is not supported.
	#endif
	#define SLIPP_COMPILER SLIPP_MSVC

	#define SLIPP_PLATFORM_INTERFACE SLIPP_WINDOWS_INTERFACE

#elif (defined(__GNUC__))
	#if (defined(__clang__))
		#if ((__clang_major__ < 2) || (__clang_minor__ < 8))
			#error CLANG of version lower than 2.8.0 is not supported
		#endif
		#define SLIPP_COMPILER SLIPP_CLANG
	#else
		#if ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
			#error GCC of version lower than 4.3.0 is not supported
		#endif
		#define SLIPP_COMPILER SLIPP_GCC
	#endif

	#define SLIPP_PLATFORM_INTERFACE SLIPP_POSIX_INTERFACE

#else
	#error SLI++ can only be used with Microsoft Visual C++, GCC (G++), or clang (clang++).
#endif


#ifdef __SSE2__
#define SLIPP_ENABLE_SSE2
#endif

#ifdef HAS_INTEL_ARBB
	#define SLIPP_ENABLE_INTEL_ARBB
#endif

#ifdef HAS_INTEL_IPP
	#define SLIPP_ENABLE_INTEL_IPPS
	#define SLIPP_ENABLE_INTEL_IPPI
	#define SLIPP_ENABLE_INTEL_IPPM
#endif

#ifdef HAS_INTEL_MKL
	#define SLIPP_ENABLE_MKL_BLAS
	#define SLIPP_ENABLE_MKL_LAPACK
	#define SLIPP_ENABLE_MKL_VMS
	#define SLIPP_ENABLE_MKL_RANDOM
#endif


#endif

